package com.woniuxy.woniuticket.moviemodule.service.impl;

import com.woniuxy.woniuticket.moviemodule.dao.CinemaMoviesDAO;
import com.woniuxy.woniuticket.moviemodule.service.CinemaMoviesService;
import com.woniuxy.woniuticket.pojo.CinemaMovies;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by 赵晓东 on 2019/6/18/018.
 */
@Service
public class CinemaMoviesServiceImpl implements CinemaMoviesService {
    @Resource
    private CinemaMoviesDAO cinemaMoviesDAO;
    @Override
    public List<CinemaMovies> findAll() {
        return cinemaMoviesDAO.findAllMovies();
    }

    @Override
    public CinemaMovies findMovieById(Integer id) {
        return cinemaMoviesDAO.selectByPrimaryKey(id);
    }

    @Override
    public List<CinemaMovies> findAllByTime(String time) {
        return cinemaMoviesDAO.queryAllMovieByTime(time);
    }
}
